package com.example.service.webhook.business.email.dto;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.ArrayList;
import java.util.List;
@JsonIgnoreProperties(ignoreUnknown=true)
public class EmailBillShoppingSheetList {
    @JsonProperty("total_size")
    private Integer totalSize;
    private Integer size;
    @JsonProperty("shopping_sheets")
    private List<EmailBillShoppingSheet> shoppingSheets;

    public EmailBillShoppingSheetList() {
        this.totalSize = 0;
        this.size = 0;
    }

    public Integer getTotalSize() {
        return totalSize;
    }

    public void setTotalSize(Integer totalSize) {
        this.totalSize = totalSize;
    }

    public Integer getSize() {
        return size;
    }

    public void setSize(Integer size) {
        this.size = size;
    }

    public List<EmailBillShoppingSheet> getShoppingSheets() {
        return shoppingSheets;
    }

    public void setShoppingSheets(List<EmailBillShoppingSheet> shoppingSheets) {
        this.shoppingSheets = shoppingSheets;
    }


    public void addShoppingSheet(EmailBillShoppingSheet sheet) {
        if (shoppingSheets == null) {
            shoppingSheets = new ArrayList<>();
        }
        shoppingSheets.add(sheet);
    }
}
